BASE_URL = '/test-de-nivel';
// in production: BASE_URL = '/test/language-tests'

function actionConfirm(url) {
    // a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
    $("#dialog").dialog("destroy");

    
    $("#dialog-confirm").dialog({
        resizable: false,
        height:180,
        width: 400,
        modal: true,
        buttons: {
            'Delete': function() {
                location.href=url;
                //$(this).dialog('close');
            },
            Cancel: function() {
                $(this).dialog('destroy');
            }
        }
    });
}

function errorMessage(title, message) {

    $("#dialog-error").dialog("destroy");

    var content = '<span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>';
    content += message;

    $('#dialog-error').html(content).dialog({
        resizable: false,
        height:180,
        width: 400,
        modal: true,
        title: title,
        buttons: {
            Close: function() {
                $(this).dialog('destroy');
            }
        }
    });
}
